#include <stdio.h>
int main()
{
	int a = 1256;
	float b=0.0;
	char c[16];

	b=(2048-(double)a)*100/2048;
	int len = snprintf(c,sizeof(c),"%.2f",b);
	printf("--------%s-----------\r\n",c);
	//printf("-----%02f-----\r\n",(float)(a/2048));
	printf("-----%f%%------\r\n",b);
	return 0;
}
